# $Id: PKGBUILD 78291 2012-10-17 10:29:11Z allan $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Roman Kyrylych <roman@archlinux.org>
# Contributor: javonera <javonera@gmail.com>

pkgname=screenlets
pkgver=0.1.6
pkgrel=4
pkgdesc="Widget framework that consists of small owner-drawn applications"
arch=('any')
url="http://screenlets.org/"
license=('GPL3')
depends=('python2-beautifulsoup3' 'python2-dbus' 'python2-gconf' 
         'python2-gnomekeyring' 'python2-rsvg' 'pywebkitgtk' 
         'python2-wnck' 'python2-xdg' 'hicolor-icon-theme' 'xdg-utils')
optdepends=('screenlets-pack-basic: Desktop widgets')
install=$pkgname.install
source=(https://launchpad.net/screenlets/trunk/$pkgver/+download/$pkgname-$pkgver.tar.bz2)
md5sums=('028ce6b6c8764190d435436d5cbaf68c')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i 's@^#!.*python$@#!/usr/bin/python2@' src/share/screenlets-manager/*.py
  sed -i 's/python -u/python2 -u/' src/bin/* src/lib/*.py src/share/screenlets-manager/*.py

  python2 setup.py build
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  python2 setup.py install --root=$pkgdir/ --optimize=1
}
